package com.aaa.controller.fpa;

import cn.hutool.core.util.ObjectUtil;
import com.aaa.controller.BaseController;
import com.aaa.entity.Result;
import com.aaa.entity.fpa.TesterFpa;
import com.aaa.service.fpa.TesterFpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：陈昂（731712841@qq.com）
 * @date ：Created in 2022/9/7 9:12
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/phone")
public class TesterFpaController extends BaseController {
    @Autowired
    TesterFpaService testerFpaService;
    @RequestMapping("queryPhone")
    public Result queryPhone(String phone){
        TesterFpa testerFpa = testerFpaService.queryByPhone(phone);
        if(ObjectUtil.isNotEmpty(testerFpa)) {
            return fail("手机号已做过测试");
        }else {
            return success("");
        }
    }

}
